platform :ios, '9.0'
#use_frameworks!

source 'https://github.com/CocoaPods/Specs.git'
source 'https://gitee.com/dvlproad/dvlproadSpecs'

post_install do |installer|
    
    puts 'Determining pod project minimal deployment target'
    
    pods_project = installer.pods_project
    deployment_target_key = 'IPHONEOS_DEPLOYMENT_TARGET'
    deployment_targets = pods_project.build_configurations.map{ |config| config.build_settings[deployment_target_key] }
    minimal_deployment_target = deployment_targets.min_by{ |version| Gem::Version.new(version) }
    # 所得 minimal_deployment_target 为本文件顶部设置的 platform :ios, '9.0' ，下面打印的log可在执行pod install的终端上查看

    puts 'Minimal deployment target is ' + minimal_deployment_target.to_s # 添加了 .to_s，将值转换为字符串
    puts 'Setting each pod deployment target to ' + minimal_deployment_target.to_s # 添加了 .to_s，将值转换为字符串

    installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
            # 修复[File not found: /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphoneos.a](https://stackoverflow.com/questions/75574268/missing-file-libarclite-iphoneos-a-xcode-14-3)
            config.build_settings[deployment_target_key] = minimal_deployment_target
        end
    end
end

target 'AppCommonJSCollect' do
  pod 'CQDemoKit',            '~> 0.5.0',     :subspecs => ['BaseVC', 'BaseUtil']
 
  pod 'CJComplexUIKit',       :subspecs => ['UIViewController/CJBaseWebViewController']
  
  pod 'CJFeature/CJRichScan', '0.0.2'
  
  pod 'WebViewJavascriptBridge'
end

target 'AppCommonJSCollectTests' do
  
end
